package com.ys.nms.module.business.dal.mysql.otheroid;

import java.util.*;

import com.ys.nms.framework.common.pojo.PageResult;
import com.ys.nms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ys.nms.framework.mybatis.core.mapper.BaseMapperX;
import com.ys.nms.module.business.dal.dataobject.otheroid.OtherOidDO;
import org.apache.ibatis.annotations.Mapper;
import com.ys.nms.module.business.controller.admin.otheroid.vo.*;

/**
 * 补充其它OID Mapper
 *
 * @author zzy
 */
@Mapper
public interface OtherOidMapper extends BaseMapperX<OtherOidDO> {

    default PageResult<OtherOidDO> selectPage(OtherOidPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OtherOidDO>()
                .likeIfPresent(OtherOidDO::getName, reqVO.getName())
                .eqIfPresent(OtherOidDO::getDeviceId, reqVO.getDeviceId())
                .eqIfPresent(OtherOidDO::getAddType, reqVO.getAddType())
                .betweenIfPresent(OtherOidDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OtherOidDO::getId));
    }

}